package com.shiro.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shiro.Mapper.UserMapper;
import com.shiro.POJO.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginService {
    @Autowired
    private UserMapper userMapper;
    public User login(String username) {
       QueryWrapper queryWrapper = new QueryWrapper();
       queryWrapper.eq("username", username);
       User user = userMapper.selectOne(queryWrapper);
       return user;
    }
}
